<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/exam.css?v=1">
<script type="text/javascript" src="/Template/js/amazeui.js"></script>
<script type="text/javascript">


    $(function() {

        //初始化页面配置
        initPage("检测评估");

//        $("#pronationCheck input[type='checkbox']").click(function() {
//            lert(113);
//            if($(this).is(":checked")){
//                alert(123);
//            }
//        });
        $("textarea").keypress(function(e) {
            if (e.which == 13) {
                return false;
            }
        });


        var app = new Vue({
            el: '#container',
            data: {
            },
            methods: {
                checkRole: function(employeeRoleId, roleId) {
                    var employeeRoleArr = employeeRoleId.split(",");
                    var roleArr = roleId.split(",");

                    var result = false;
                    $.each(roleArr, function(i,val){
                        if($.inArray(val, employeeRoleArr) != -1 || $.inArray((parseInt(val)+100).toString(), employeeRoleArr) != -1){
                            result = true;
                        }
                    });
                    return result;
                },
                cancel: function() {
                    window.location.href = "/wechat/workorder/index/id/{$workorderId}";
                },
                save: function() {
                    var examBasicId = $("input[name=examBasicId]").val();
                    var workorderId = $("input[name=workorderId]").val();
                    var side  = $("select[name=side]").val();
                    var eb0 = $("select[name=eb0]").val();
                    var eb1 = $("select[name=eb1]").val();
                    var eb2 = $("select[name=eb2]").val();
                    var eb3 = $("input[name=eb3]").val();
                    var eb4 = $("select[name=eb4]").val();
                    var eb5 = $("input[name=eb5]").val();
                    var eb6 = $("select[name=eb6]").val();
                    var eb7 = $("select[name=eb7]").val();
                    var eb8 = $("select[name=eb8]").val();
                    var eb9 = $("select[name=eb9]").val();
                    var eb10 = $("select[name=eb10]").val();
                    var eb11 = $("select[name=eb11]").val();
                    var eb12 = $("select[name=eb12]").val();
                    var eb13 = $("select[name=eb13]").val();
                    var eb14 = $("select[name=eb14]").val();
                    var eb15 = $("select[name=eb15]").val();
                    var eb16 = $("select[name=eb16]").val();
                    var eb17 = $("select[name=eb17]").val();
                    var eb18 = $("select[name=eb18]").val();
                    var eb19 = $("select[name=eb19]").val();
                    var eb20 = $("select[name=eb20]").val();
                    var eb21 = $("select[name=eb21]").val();
                    var eb22 = $("select[name=eb22]").val();
                    var eb23 = $("select[name=eb23]").val();
                    var eb24 = $("select[name=eb24]").val();
                    var eb25 = $("select[name=eb25]").val();
                    var eb26 = $("select[name=eb26]").val();
                    var eb27 = $("select[name=eb27]").val();
                    var eb28 = $("select[name=eb28]").val();
                    var eb29 = $("select[name=eb29]").val();
                    var eb30 = $("input[name=eb30]").val();
                    var eb31 = $("input[name=eb31]").val();
                    var eb32 = $("input[name=eb32]").val();
                    var eb33 = $("input[name=eb33]").val();
                    var eb34 = $("input[name=eb34]").val();
                    var eb35 = $("input[name=eb35]").val();
                    var eb36 = $("input[name=eb36]").val();
                    var eb37 = $("input[name=eb37]").val();
                    var eb38 = $("input[name=eb38]").val();
                    var eb39 = $("input[name=eb39]").val();
                    var eb40 = $("input[name=eb40]").val();
                    var eb41 = $("input[name=eb41]").val();

                    var ebl0 = $("textarea[name=ebl0]").val().replace(/[\r\n]/g,"");

                    var completed = "1";
                    if(isNullOrEmpty(side
                            && eb0
                            && eb1
                            && eb2
                            && eb3
                            && eb4
                            && eb5
                            && eb6
                            && eb7
                            && eb8
                            && eb9
                            && eb10
                            && eb11
                            && eb12
                            && eb14
                            && eb15
                            && eb16
                            && eb17
                            && eb18
                            && eb19
                            && eb20
                            && eb21
                            && eb22
                            && eb23
                            && eb24
                            && eb25
                            && eb26
                            && eb27
                            && eb28
                            && eb29
                            && eb30
                            && eb31
                            && eb32
                            && eb33
                            && eb34
                            && eb35
                            && eb36
                            && eb37
                            && eb38
                            && eb39
                            && eb40
                            && eb41
                            && ebl0)) {
                        completed = "-1";
                    }


                    $.ajax({
                        url:"/wechat/workorder/examBasicKafoPost",
                        type:"post",
                        data:{
                            examBasicId: examBasicId,
                            workorderId: workorderId,
                            side:side,
                            eb0:eb0,
                            eb1:eb1,
                            eb2:eb2,
                            eb3:eb3,
                            eb4:eb4,
                            eb5:eb5,
                            eb6:eb6,
                            eb7:eb7,
                            eb8:eb8,
                            eb9:eb9,
                            eb10:eb10,
                            eb11:eb11,
                            eb12:eb12,
                            eb13:eb13,
                            eb14:eb14,
                            eb15:eb15,
                            eb16:eb16,
                            eb17:eb17,
                            eb18:eb18,
                            eb19:eb19,
                            eb20:eb20,
                            eb21:eb21,
                            eb22:eb22,
                            eb23:eb23,
                            eb24:eb24,
                            eb25:eb25,
                            eb26:eb26,
                            eb27:eb27,
                            eb28:eb28,
                            eb29:eb29,
                            eb30:eb30,
                            eb31:eb31,
                            eb32:eb32,
                            eb33:eb33,
                            eb34:eb34,
                            eb35:eb35,
                            eb36:eb36,
                            eb37:eb37,
                            eb38:eb38,
                            eb39:eb39,
                            eb40:eb40,
                            eb41:eb41,
                            ebl0:ebl0,

                            completed:completed,
                        },
                        dataType:"JSON",
                        beforeSend:function(){
                            $("#loadingToast").show();
                        },
                        complete:function(){
                            $('#loadingToast').hide();
                        },
                        success:function(data){
                            if(data.code == 200) {
//                                alert(data.alert);
                                alert("保存成功");
                                window.location.href = "/wechat/workorder/index/id/{$workorderId}";
                            }
                        },
                    })

                }
            }
        })
        $(".item select").change(function() {
            var value = $(this).find("option:selected").text();
            $(this).prev().val(value);
        });
    })

</script>

<div class="container" id="container">
    <div class="hint-info">
        <span class="update_time">{$formDict.update_time}：{$examBasic.update_time}</span>
        <span class="employee_name">{$formDict.update_name}：{$employeeName}</span>
    </div>
    <div class="edit-info">
        <div class="edit-content" >
            <input type="text" style="display: none;" name="workorderId" value="{$workorderId}">
            <input type="text" style="display: none;" name="examBasicId" value="{$examBasicId}">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>位置：</span>
            <input id="side" type="text" value="{$examBasic.side}" readonly placeholder="请选择">
            <select name="side">
                <option value="{$examBasic.side}">请选择</option>
                {:getFormDictSelectOption($examBasic['side'],'side','exam_basic',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>行动能力：</span>
            <input id="eb0" type="text" value="{$examBasic.eb0}" readonly placeholder="请选择">
            <select name="eb0">
                <option value="{$examBasic.eb0}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb0'],'mobility','exam_basic',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt=""></div>
        <div class="item" style="border-bottom:0px">
            <span>小腿控制能力：</span>
            <input id="eb1" type="text" value="{$examBasic.eb1}" readonly placeholder="请选择">
            <select name="eb1">
                <option value="{$examBasic.eb1}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb1'],'shankcontrol','exam_basic',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>取型时负重状态：</span>
            <input id="eb2" type="text" value="{$examBasic.eb2}" readonly placeholder="请选择">
            <select name="eb2">
                <option value="{$examBasic.eb2}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb2'],'burden','exam_measure',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <if condition="$workorder['workorder_type'] eq '5'">
            <div class="item" style="border-bottom:0px"><span>鞋跟有效高度：</span><input name="eb3" type="text" value="{$examBasic.eb3}" placeholder="请输入数据(mm)"></div>
            <div class="item" style="border-bottom:0px">
                <span>平时所穿鞋号:</span>
                <input id="eb4" type="text" value="{$examBasic.eb4}" readonly placeholder="请选择">
                <select name="eb4">
                    <option value="{$examBasic.eb4}">请选择</option>
                    {:getFormDictSelectOption($examBasic['eb4'],'shoe_type','exam_basic',0)}
                </select>
                <img class="icon-right" src="/Template/images/icon-right.png" alt="">
            </div>
            <div class="item" style="border-bottom:0px"><span></span><input name="eb5" type="text" value="{$examBasic.eb5}" placeholder="请输入鞋号"></div>
        </if>
        <div class="item">
            <span>功能障碍描述及其他备注：</span>
            <textarea class="t-area" name="ebl0" maxlength="120" placeholder="请填写">{$examBasic.ebl0}</textarea>
        </div>
        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 15%">—— 肌力(0、1、2、3、4、5级) ——</span>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋伸肌：</span>
            <input id="eb6" type="text" value="{$examBasic.eb6}" readonly placeholder="请选择">
            <select name="eb6">
                <option value="{$examBasic.eb6}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb6'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋屈肌：</span>
            <input id="eb7" type="text" value="{$examBasic.eb7}" readonly placeholder="请选择">
            <select name="eb7">
                <option value="{$examBasic.eb7}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb7'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内收肌：</span>
            <input id="eb8" type="text" value="{$examBasic.eb8}" readonly placeholder="请选择">
            <select name="eb8">
                <option value="{$examBasic.eb8}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb8'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外展肌：</span>
            <input id="eb9" type="text" value="{$examBasic.eb9}" readonly placeholder="请选择">
            <select name="eb9">
                <option value="{$examBasic.eb9}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb9'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内旋肌：</span>
            <input id="eb10" type="text" value="{$examBasic.eb10}" readonly placeholder="请选择">
            <select name="eb10">
                <option value="{$examBasic.eb10}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb10'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外旋肌：</span>
            <input id="eb11" type="text" value="{$examBasic.eb11}" readonly placeholder="请选择">
            <select name="eb11">
                <option value="{$examBasic.eb11}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb11'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>股四头肌：</span>
            <input id="eb12" type="text" value="{$examBasic.eb12}" readonly placeholder="请选择">
            <select name="eb12">
                <option value="{$examBasic.eb12}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb12'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>腘绳肌：</span>
            <input id="eb13" type="text" value="{$examBasic.eb13}" readonly placeholder="请选择">
            <select name="eb13">
                <option value="{$examBasic.eb13}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb13'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>胫前肌：</span>
            <input id="eb14" type="text" value="{$examBasic.eb14}" readonly placeholder="请选择">
            <select name="eb14">
                <option value="{$examBasic.eb14}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb14'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item">
            <span>小腿三头肌：</span>
            <input id="eb15" type="text" value="{$examBasic.eb15}" readonly placeholder="请选择">
            <select name="eb15">
                <option value="{$examBasic.eb15}">请选择</option>
                {:getFormDictSelectOption($examBasic['ms10'],'ms','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 15%">—— 肌张力(0、1、1+、2、3、4级) ——</span>
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋伸肌：</span>
            <input id="eb16" type="text" value="{$examBasic.eb16}" readonly placeholder="请选择">
            <select name="eb16">
                <option value="{$examBasic.eb16}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb16'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋屈肌：</span>
            <input id="eb17" type="text" value="{$examBasic.eb17}" readonly placeholder="请选择">
            <select name="eb17">
                <option value="{$examBasic.eb17}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb17'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内收肌：</span>
            <input id="eb18" type="text" value="{$examBasic.eb18}" readonly placeholder="请选择">
            <select name="eb18">
                <option value="{$examBasic.eb18}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb18'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外展肌：</span>
            <input id="eb19" type="text" value="{$examBasic.eb19}" readonly placeholder="请选择">
            <select name="eb19">
                <option value="{$examBasic.eb19}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb19'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋内旋肌：</span>
            <input id="eb20" type="text" value="{$examBasic.eb20}" readonly placeholder="请选择">
            <select name="eb20">
                <option value="{$examBasic.eb20}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb20'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>髋外旋肌：</span>
            <input id="eb21" type="text" value="{$examBasic.eb21}" readonly placeholder="请选择">
            <select name="eb21">
                <option value="{$examBasic.eb21}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb21'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>股四头肌：</span>
            <input id="eb22" type="text" value="{$examBasic.eb22}" readonly placeholder="请选择">
            <select name="eb22">
                <option value="{$examBasic.eb22}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb22'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>腘绳肌：</span>
            <input id="eb23" type="text" value="{$examBasic.eb23}" readonly placeholder="请选择">
            <select name="eb23">
                <option value="{$examBasic.eb23}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb23'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>胫前肌：</span>
            <input id="eb24" type="text" value="{$examBasic.eb24}" readonly placeholder="请选择">
            <select name="eb24">
                <option value="{$examBasic.eb24}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb24'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>小腿三头肌：</span>
            <input id="eb25" type="text" value="{$examBasic.eb25}" readonly placeholder="请选择">
            <select name="eb25">
                <option value="{$examBasic.eb25}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb25'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>腓肠肌：</span>
            <input id="eb26" type="text" value="{$examBasic.eb26}" readonly placeholder="请选择">
            <select name="eb26">
                <option value="{$examBasic.eb26}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb26'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>比目鱼肌：</span>
            <input id="eb27" type="text" value="{$examBasic.eb27}" readonly placeholder="请选择">
            <select name="eb27">
                <option value="{$examBasic.eb27}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb27'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item" style="border-bottom:0px">
            <span>踝阵挛：</span>
            <input id="eb28" type="text" value="{$examBasic.eb28}" readonly placeholder="请选择">
            <select name="eb28">
                <option value="{$examBasic.eb28}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb28'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>
        <div class="item">
            <span>托马斯试验：</span>
            <input id="eb29" type="text" value="{$examBasic.eb29}" readonly placeholder="请选择">
            <select name="eb29">
                <option value="{$examBasic.eb29}">请选择</option>
                {:getFormDictSelectOption($examBasic['eb29'],'mt','exam_basic_cp',0)}
            </select>
            <img class="icon-right" src="/Template/images/icon-right.png" alt="">
        </div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 关节活动范围(髋关节角度) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>屈曲(0-125)：</span><input name="eb30" type="text" value="{$examBasic.eb30}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>伸直(0-15)：</span><input name="eb31" type="text" value="{$examBasic.eb31}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>内收(0-45)：</span><input name="eb32" type="text" value="{$examBasic.eb32}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>外展(0-30)：</span><input name="eb33" type="text" value="{$examBasic.eb33}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>内旋(0-45)：</span><input name="eb34" type="text" value="{$examBasic.eb34}" placeholder="请输入"></div>
        <div class="item"><span>外旋(0-45)：</span><input name="eb35" type="text" value="{$examBasic.eb35}" placeholder="请输入"></div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 关节活动范围(膝关节角度) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>屈曲(0-120)：</span><input name="eb36" type="text" value="{$examBasic.eb36}" placeholder="请输入"></div>
        <div class="item"><span>伸直(0-10)：</span><input name="eb37" type="text" value="{$examBasic.eb37}" placeholder="请输入"></div>

        <div class="item" style="border-bottom:0px">
            <span style="width: 100%; margin-left: 20%">—— 关节活动范围(踝关节角度) ——</span>
        </div>
        <div class="item" style="border-bottom:0px"><span>跖屈：</span><input name="eb38" type="text" value="{$examBasic.eb38}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>背伸R1(伸膝时)：</span><input name="eb39" type="text" value="{$examBasic.eb39}" placeholder="请输入"></div>
        <div class="item" style="border-bottom:0px"><span>背伸R2(伸膝时)：</span><input name="eb40" type="text" value="{$examBasic.eb40}" placeholder="请输入"></div>
        <div class="item"><span>背伸R2(屈膝时)：</span><input name="eb41" type="text" value="{$examBasic.eb41}" placeholder="请输入"></div>

    </div>
    <div class="operation-btn">
        <div class="cancle-btn" v-on:click="cancel">取消</div>
        <if condition="$workorder['status'] lt '2' && $workorder['creator_id'] eq $customerId">
           <div class="save-btn" v-on:click="save">保存</div>
            <!--<elseif condition="$workorder['status'] lt '3' && $job[0] eq 100"/>-->
            <!--<div class="save-btn" v-on:click="save">保存</div>-->
        </if>
        <!--if condition="$workorder['status'] eq '2' && $workorder['examinator_id'] eq $customerId">
            <div class="save-btn" v-on:click="save">保存</div>
        </if-->

    </div>

</div>
<include file="./Template/footer.html" />